package com.yuelan.apartment.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @description: 房客信息
 * @Author: ZhaoYi
 * @date: 24-5-23 16:52
 */
@ApiModel("房客信息")
@Data
@TableName("apa_tenant_info")
public class TenantInfo implements Serializable {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty("房客id")
    @TableId
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;


    @ApiModelProperty("房间id")
    @NotNull(message = "房间编号不能为空")
    private String room_id;


    @ApiModelProperty("房源id")
    @NotNull(message = "房源编号不能为空")
    private Long apartment_id;


    @ApiModelProperty("房客姓名")
    @NotNull(message = "房客姓名不能为空")
    private String name;


    @ApiModelProperty("房客手机号")
    @NotNull(message = "房客手机号不能为空")
    private String phone;


    @ApiModelProperty("房客身份证号")
    @NotNull(message = "房客身份证号不能为空")
    private String id_number;


    @ApiModelProperty("合同生效时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date create_time;


    @ApiModelProperty("合同失效时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date end_time;

}
